home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 5 Developer's Kit / vb5 dev kit.iso / dev / t2win-32 / _string.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-08-24  |  87.4 KB  |  2,069 lines

  1. VERSION 4.00
  2. Begin VB.Form frmString 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "String"
  5.    ClientHeight    =   5235
  6.    ClientLeft      =   330
  7.    ClientTop       =   2385
  8.    ClientWidth     =   9765
  9.    Height          =   5640
  10.    Left            =   270
  11.    MaxButton       =   0   'False
  12.    MDIChild        =   -1  'True
  13.    ScaleHeight     =   5235
  14.    ScaleWidth      =   9765
  15.    ShowInTaskbar   =   0   'False
  16.    Top             =   2040
  17.    Width           =   9885
  18.    Begin VB.TextBox txt_Result 
  19.       BackColor       =   &H00C0C0C0&
  20.       BorderStyle     =   0  'None
  21.       Height          =   4005
  22.       Left            =   105
  23.       Locked          =   -1  'True
  24.       MultiLine       =   -1  'True
  25.       ScrollBars      =   2  'Vertical
  26.       TabIndex        =   8
  27.       Top             =   630
  28.       Width           =   9555
  29.    End
  30.    Begin Threed.SSPanel SSPanel1 
  31.       Align           =   1  'Align Top
  32.       Height          =   480
  33.       Left            =   0
  34.       TabIndex        =   0
  35.       Top             =   0
  36.       Width           =   9765
  37.       _Version        =   65536
  38.       _ExtentX        =   17224
  39.       _ExtentY        =   847
  40.       _StockProps     =   15
  41.       ForeColor       =   -2147483640
  42.       BackColor       =   12632256
  43.       Begin VB.ComboBox cmb_Function 
  44.          Height          =   315
  45.          Left            =   1365
  46.          TabIndex        =   1
  47.          Top             =   75
  48.          Width           =   7170
  49.       End
  50.       Begin Threed.SSCommand cmdNP 
  51.          Height          =   300
  52.          Index           =   1
  53.          Left            =   9435
  54.          TabIndex        =   10
  55.          Top             =   90
  56.          Width           =   255
  57.          _Version        =   65536
  58.          _ExtentX        =   450
  59.          _ExtentY        =   529
  60.          _StockProps     =   78
  61.          Caption         =   ">"
  62.          BevelWidth      =   1
  63.          Font3D          =   3
  64.          RoundedCorners  =   0   'False
  65.          Outline         =   0   'False
  66.       End
  67.       Begin Threed.SSCommand cmdNP 
  68.          Height          =   300
  69.          Index           =   0
  70.          Left            =   8595
  71.          TabIndex        =   9
  72.          Top             =   90
  73.          Width           =   255
  74.          _Version        =   65536
  75.          _ExtentX        =   450
  76.          _ExtentY        =   529
  77.          _StockProps     =   78
  78.          Caption         =   "<"
  79.          BevelWidth      =   1
  80.          Font3D          =   3
  81.          RoundedCorners  =   0   'False
  82.          Outline         =   0   'False
  83.       End
  84.       Begin VB.Label Label2 
  85.          Caption         =   "&Select a function"
  86.          Height          =   255
  87.          Left            =   90
  88.          TabIndex        =   3
  89.          Top             =   120
  90.          Width           =   1275
  91.       End
  92.       Begin Threed.SSCommand SSCommand1 
  93.          Default         =   -1  'True
  94.          Height          =   300
  95.          Left            =   8910
  96.          TabIndex        =   2
  97.          Top             =   90
  98.          Width           =   465
  99.          _Version        =   65536
  100.          _ExtentX        =   820
  101.          _ExtentY        =   529
  102.          _StockProps     =   78
  103.          Caption         =   "&Go"
  104.          BevelWidth      =   1
  105.          RoundedCorners  =   0   'False
  106.          Outline         =   0   'False
  107.       End
  108.    End
  109.    Begin Threed.SSPanel SSPanel2 
  110.       Align           =   2  'Align Bottom
  111.       Height          =   465
  112.       Left            =   0
  113.       TabIndex        =   4
  114.       Top             =   4770
  115.       Width           =   9765
  116.       _Version        =   65536
  117.       _ExtentX        =   17224
  118.       _ExtentY        =   820
  119.       _StockProps     =   15
  120.       BackColor       =   12632256
  121.       Begin VB.TextBox Text1 
  122.          Height          =   285
  123.          Left            =   1440
  124.          TabIndex        =   6
  125.          Tag             =   "A/BC/DEF/GHIJ/KLMNOP/"
  126.          Top             =   90
  127.          Width           =   7350
  128.       End
  129.       Begin Threed.SSCommand SSCommand2 
  130.          Height          =   285
  131.          Left            =   8865
  132.          TabIndex        =   7
  133.          Top             =   90
  134.          Width           =   825
  135.          _Version        =   65536
  136.          _ExtentX        =   1455
  137.          _ExtentY        =   503
  138.          _StockProps     =   78
  139.          Caption         =   "&Reset"
  140.          BevelWidth      =   1
  141.          Outline         =   0   'False
  142.       End
  143.       Begin VB.Label Label1 
  144.          Caption         =   "&Enter a test string"
  145.          Height          =   255
  146.          Left            =   90
  147.          TabIndex        =   5
  148.          Top             =   120
  149.          Width           =   1275
  150.       End
  151.    End
  152. Attribute VB_Name = "frmString"
  153. Attribute VB_Creatable = False
  154. Attribute VB_Exposed = False
  155. Option Explicit
  156. Option Base 1
  157. Private Const Iteration = 250
  158. Dim IsLoaded         As Integer
  159. Dim TimerStartOk     As Integer
  160. Dim TimerCloseOk     As Integer
  161. Dim TimerHandle      As Integer
  162. Dim TimerValue       As Long
  163. Private Sub cmdNP_Click(Index As Integer)
  164.    Call sub_NextPrev(cmb_Function, Index)
  165. End Sub
  166. Private Sub cmb_Function_Click()
  167.    If (IsLoaded = False) Then Exit Sub
  168.    Call cDisableFI(mdiT2W.Picture1)
  169.    SSPanel2.Visible = True
  170.    txt_Result = ""
  171.    DoEvents
  172.    Select Case cmb_Function.ListIndex
  173.       Case 0
  174.          Call TestOneCharFromLeft
  175.       Case 1
  176.          Call TestOneCharFromRight
  177.       Case 2
  178.          Call TestBlockCharFromLeft
  179.       Case 3
  180.          Call TestBlockCharFromRight
  181.       Case 4
  182.          Call TestGetIn
  183.       Case 5
  184.          Call TestGetInR
  185.       Case 6
  186.          Call TestGetInPart
  187.       Case 7
  188.          Call TestGetInPartR
  189.       Case 8
  190.          Call TestGetBlock
  191.       Case 9
  192.          Call TestInsertChars
  193.       Case 10
  194.          Call TestInsertByMask
  195.       Case 11
  196.          Call TestInsertBlocks
  197.       Case 12
  198.          Call TestInsertBlocksBy
  199.       Case 13
  200.          Call TestRemoveOneChar
  201.       Case 14
  202.          Call TestRemoveBlockChar
  203.       Case 15
  204.          Call TestTokenIn
  205.       Case 16
  206.          SSPanel2.Visible = False
  207.          Call TestOrTokenX
  208.       Case 17
  209.          SSPanel2.Visible = False
  210.          Call TestAndTokenX
  211.       Case 18
  212.          Call TestReverse
  213.       Case 19
  214.          Call TestMixChars
  215.       Case 20
  216.          Call TestScrollX
  217.       Case 21
  218.          Call TestChangeChars
  219.       Case 22
  220.          Call TestChangeCharsUntil
  221.       Case 23
  222.          Call TestCheckChars
  223.       Case 24
  224.          Call TestFilterChars
  225.       Case 25
  226.          Call TestFilterNotChars
  227.       Case 26
  228.          Call TestFilterBlocks
  229.       Case 27
  230.          Call TestResizeString
  231.       Case 28
  232.          Call TestResizeStringAndFill
  233.       Case 29
  234.          Call TestCreateAndFill
  235.       Case 30
  236.          Call TestFill
  237.       Case 31
  238.          Call TestLrc
  239.       Case 32
  240.          Call TestCompress
  241.       Case 33
  242.          SSPanel2.Visible = False
  243.          Call TestCompressTab
  244.       Case 34
  245.          Call TestCompact
  246.       Case 35
  247.          Call TestAlign
  248.       Case 36
  249.          Call TestProperName
  250.       Case 37
  251.          Call TestProperName2
  252.       Case 38
  253.          Call TestStringSAR
  254.       Case 39
  255.          Call TestToHexa
  256.       Case 40
  257.          SSPanel2.Visible = False
  258.          Call TestRomanArabic
  259.       Case 41
  260.          Call TestAsciiEbcdic
  261.       Case 42
  262.          SSPanel2.Visible = False
  263.          Call TestPatternMatch
  264.       Case 43
  265.          SSPanel2.Visible = False
  266.          Call TestPatternExtMatch
  267.       Case 44
  268.          Call TestCheckNumericity
  269.       Case 45
  270.          Call TestAlphaDigit
  271.       Case 46
  272.          SSPanel2.Visible = False
  273.          Call TestH2X
  274.       Case 47
  275.          Call TestSortStr
  276.       Case 48
  277.          Call TestMorse
  278.       Case 49
  279.          Call TestToZ9
  280.    End Select
  281.    DoEvents
  282.    Call cEnableFI(mdiT2W.Picture1)
  283. End Sub
  284. Private Sub Form_Activate()
  285.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  286. End Sub
  287. Private Sub Form_Load()
  288.    IsLoaded = False
  289.    Show
  290.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  291.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_string.t2w")
  292.    IsLoaded = True
  293. End Sub
  294. Private Sub SSCommand1_Click()
  295.    Call cmb_Function_Click
  296. End Sub
  297. Private Sub TestOneCharFromLeft()
  298.    Dim intResult        As Integer
  299.    Dim strResult        As String
  300.    Dim strDisplay       As String
  301.    Dim i                As Integer
  302.    Dim Str1             As String
  303.    intResult = 0
  304.    strResult = ""
  305.    strDisplay = ""
  306.      
  307.    Str1 = Text1.Text
  308.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  309.    strDisplay = strDisplay & "03: '" & cOneCharFromLeft(Str1, 3) & "'" & vbCrLf
  310.    strDisplay = strDisplay & "07: '" & cOneCharFromLeft(Str1, 7) & "'" & vbCrLf
  311.    strDisplay = strDisplay & "01: '" & cOneCharFromLeft(Str1, 1) & "'" & vbCrLf
  312.    strDisplay = strDisplay & "21: '" & cOneCharFromLeft(Str1, 21) & "'" & vbCrLf
  313.    strDisplay = strDisplay & "14: '" & cOneCharFromLeft(Str1, 14) & "'" & vbCrLf
  314.    txt_Result = strDisplay
  315.    'time the function
  316.    TimerHandle = cTimerOpen()
  317.    TimerStartOk = cTimerStart(TimerHandle)
  318.    For i = 1 To Iteration
  319.       strResult = cOneCharFromLeft(Str1, 3)
  320.    Next i
  321.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  322.    TimerCloseOk = cTimerClose(TimerHandle)
  323. End Sub
  324. Private Sub SSCommand2_Click()
  325.    Text1.Text = Text1.Tag + Left$(LCase$(Text1.Tag), Len(Text1.Tag) - 1)
  326.    Call SSCommand1_Click
  327. End Sub
  328. Private Sub TestOneCharFromRight()
  329.    Dim intResult        As Integer
  330.    Dim strResult        As String
  331.    Dim strDisplay       As String
  332.    Dim i                As Integer
  333.    Dim Str1             As String
  334.    intResult = 0
  335.    strResult = ""
  336.    strDisplay = ""
  337.      
  338.    Str1 = Text1.Text
  339.    strDisplay = strDisplay & "The 3,7,1,21,14 chars from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  340.    strDisplay = strDisplay & "03: '" & cOneCharFromRight(Str1, 3) & "'" & vbCrLf
  341.    strDisplay = strDisplay & "07: '" & cOneCharFromRight(Str1, 7) & "'" & vbCrLf
  342.    strDisplay = strDisplay & "01: '" & cOneCharFromRight(Str1, 1) & "'" & vbCrLf
  343.    strDisplay = strDisplay & "21: '" & cOneCharFromRight(Str1, 21) & "'" & vbCrLf
  344.    strDisplay = strDisplay & "14: '" & cOneCharFromRight(Str1, 14) & "'" & vbCrLf
  345.    txt_Result = strDisplay
  346.    'time the function
  347.    TimerHandle = cTimerOpen()
  348.    TimerStartOk = cTimerStart(TimerHandle)
  349.    For i = 1 To Iteration
  350.       strResult = cOneCharFromRight(Str1, 3)
  351.    Next i
  352.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  353.    TimerCloseOk = cTimerClose(TimerHandle)
  354. End Sub
  355. Private Sub TestBlockCharFromLeft()
  356.    Dim intResult        As Integer
  357.    Dim strResult        As String
  358.    Dim strDisplay       As String
  359.    Dim i                As Integer
  360.    Dim Str1             As String
  361.    intResult = 0
  362.    strResult = ""
  363.    strDisplay = ""
  364.      
  365.    Str1 = Text1.Text
  366.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from left of '" & Str1 & "' are " & vbCrLf & vbCrLf
  367.    strDisplay = strDisplay & "03: '" & cBlockCharFromLeft(Str1, 3) & "'" & vbCrLf
  368.    strDisplay = strDisplay & "07: '" & cBlockCharFromLeft(Str1, 7) & "'" & vbCrLf
  369.    strDisplay = strDisplay & "01: '" & cBlockCharFromLeft(Str1, 1) & "'" & vbCrLf
  370.    strDisplay = strDisplay & "21: '" & cBlockCharFromLeft(Str1, 21) & "'" & vbCrLf
  371.    strDisplay = strDisplay & "14: '" & cBlockCharFromLeft(Str1, 14) & "'" & vbCrLf
  372.    txt_Result = strDisplay
  373.    'time the function
  374.    TimerHandle = cTimerOpen()
  375.    TimerStartOk = cTimerStart(TimerHandle)
  376.    For i = 1 To Iteration
  377.       strResult = cBlockCharFromLeft(Str1, 3)
  378.    Next i
  379.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  380.    TimerCloseOk = cTimerClose(TimerHandle)
  381. End Sub
  382. Private Sub TestBlockCharFromRight()
  383.    Dim intResult        As Integer
  384.    Dim strResult        As String
  385.    Dim strDisplay       As String
  386.    Dim i                As Integer
  387.    Dim Str1             As String
  388.    intResult = 0
  389.    strResult = ""
  390.    strDisplay = ""
  391.      
  392.    Str1 = Text1.Text
  393.    strDisplay = strDisplay & "The 3,7,1,21,14 blocks from right of '" & Str1 & "' are " & vbCrLf & vbCrLf
  394.    strDisplay = strDisplay & "03: '" & cBlockCharFromRight(Str1, 3) & "'" & vbCrLf
  395.    strDisplay = strDisplay & "07: '" & cBlockCharFromRight(Str1, 7) & "'" & vbCrLf
  396.    strDisplay = strDisplay & "01: '" & cBlockCharFromRight(Str1, 1) & "'" & vbCrLf
  397.    strDisplay = strDisplay & "21: '" & cBlockCharFromRight(Str1, 21) & "'" & vbCrLf
  398.    strDisplay = strDisplay & "14: '" & cBlockCharFromRight(Str1, 14) & "'" & vbCrLf
  399.    txt_Result = strDisplay
  400.    'time the function
  401.    TimerHandle = cTimerOpen()
  402.    TimerStartOk = cTimerStart(TimerHandle)
  403.    For i = 1 To Iteration
  404.       strResult = cBlockCharFromRight(Str1, 3)
  405.    Next i
  406.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  407.    TimerCloseOk = cTimerClose(TimerHandle)
  408. End Sub
  409. Private Sub TestGetIn()
  410.    Dim intResult        As Integer
  411.    Dim strResult        As String
  412.    Dim strDisplay       As String
  413.    Dim i                As Integer
  414.    Dim Str1             As String
  415.    Dim Sep1             As String
  416.    intResult = 0
  417.    strResult = ""
  418.    strDisplay = ""
  419.      
  420.    Str1 = Text1.Text
  421.    Sep1 = "/"
  422.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  423.    strDisplay = strDisplay & "3: '" & cGetIn(Str1, Sep1, 3) & "'" & vbCrLf
  424.    strDisplay = strDisplay & "7: '" & cGetIn(Str1, Sep1, 7) & "'" & vbCrLf
  425.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  426.    strDisplay = strDisplay & "5: '" & cGetIn(Str1, Sep1, 5) & "'" & vbCrLf
  427.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  428.    strDisplay = strDisplay & "0: '" & cGetIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  429.    Sep1 = "G"
  430.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  431.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'" & vbCrLf
  432.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  433.    Sep1 = "g"
  434.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  435.    strDisplay = strDisplay & "2: '" & cGetIn(Str1, Sep1, 2) & "'" & vbCrLf
  436.    strDisplay = strDisplay & "1: '" & cGetIn(Str1, Sep1, 1) & "'"
  437.    txt_Result = strDisplay
  438.    'time the function
  439.    TimerHandle = cTimerOpen()
  440.    TimerStartOk = cTimerStart(TimerHandle)
  441.    For i = 1 To Iteration
  442.       strResult = cGetIn(Str1, Sep1, 3)
  443.    Next i
  444.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  445.    TimerCloseOk = cTimerClose(TimerHandle)
  446. End Sub
  447. Private Sub TestGetInR()
  448.    Dim intResult        As Integer
  449.    Dim strResult        As String
  450.    Dim strDisplay       As String
  451.    Dim i                As Integer
  452.    Dim Str1             As String
  453.    Dim Sep1             As String
  454.    intResult = 0
  455.    strResult = ""
  456.    strDisplay = ""
  457.      
  458.    Str1 = Text1.Text
  459.    Sep1 = "/"
  460.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  461.    strDisplay = strDisplay & "3: '" & cGetInR(Str1, Sep1, 3) & "'" & vbCrLf
  462.    strDisplay = strDisplay & "7: '" & cGetInR(Str1, Sep1, 7) & "'" & vbCrLf
  463.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  464.    strDisplay = strDisplay & "5: '" & cGetInR(Str1, Sep1, 5) & "'" & vbCrLf
  465.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  466.    strDisplay = strDisplay & "0: '" & cGetInR(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  467.    Sep1 = "G"
  468.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  469.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'" & vbCrLf
  470.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  471.    Sep1 = "g"
  472.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  473.    strDisplay = strDisplay & "2: '" & cGetInR(Str1, Sep1, 2) & "'" & vbCrLf
  474.    strDisplay = strDisplay & "1: '" & cGetInR(Str1, Sep1, 1) & "'"
  475.    txt_Result = strDisplay
  476.    'time the function
  477.    TimerHandle = cTimerOpen()
  478.    TimerStartOk = cTimerStart(TimerHandle)
  479.    For i = 1 To Iteration
  480.       strResult = cGetInR(Str1, Sep1, 3)
  481.    Next i
  482.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  483.    TimerCloseOk = cTimerClose(TimerHandle)
  484. End Sub
  485. Private Sub TestGetInPart()
  486.    Dim intResult        As Integer
  487.    Dim strResult        As String
  488.    Dim strDisplay       As String
  489.    Dim i                As Integer
  490.    Dim Str1             As String
  491.    Dim Sep1             As String
  492.    intResult = 0
  493.    strResult = ""
  494.    strDisplay = ""
  495.      
  496.    Str1 = Text1.Text
  497.    Sep1 = "/"
  498.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  499.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  500.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  501.    Sep1 = "G"
  502.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  503.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  504.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  505.    Sep1 = "g"
  506.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  507.    strDisplay = strDisplay & "First: '" & cGetInPart(Str1, Sep1, True) & "'" & vbCrLf
  508.    strDisplay = strDisplay & "Second: '" & cGetInPart(Str1, Sep1, False) & "'"
  509.    txt_Result = strDisplay
  510.    'time the function
  511.    TimerHandle = cTimerOpen()
  512.    TimerStartOk = cTimerStart(TimerHandle)
  513.    For i = 1 To Iteration
  514.       strResult = cGetInPart(Str1, Sep1, True)
  515.    Next i
  516.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  517.    TimerCloseOk = cTimerClose(TimerHandle)
  518. End Sub
  519. Private Sub TestGetInPartR()
  520.    Dim intResult        As Integer
  521.    Dim strResult        As String
  522.    Dim strDisplay       As String
  523.    Dim i                As Integer
  524.    Dim Str1             As String
  525.    Dim Sep1             As String
  526.    intResult = 0
  527.    strResult = ""
  528.    strDisplay = ""
  529.      
  530.    Str1 = Text1.Text
  531.    Sep1 = "/"
  532.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  533.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  534.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  535.    Sep1 = "G"
  536.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  537.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  538.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'" & vbCrLf & vbCrLf
  539.    Sep1 = "g"
  540.    strDisplay = strDisplay & "The first and the second part from the left of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  541.    strDisplay = strDisplay & "First: '" & cGetInPartR(Str1, Sep1, True) & "'" & vbCrLf
  542.    strDisplay = strDisplay & "Second: '" & cGetInPartR(Str1, Sep1, False) & "'"
  543.    txt_Result = strDisplay
  544.    'time the function
  545.    TimerHandle = cTimerOpen()
  546.    TimerStartOk = cTimerStart(TimerHandle)
  547.    For i = 1 To Iteration
  548.       strResult = cGetInPartR(Str1, Sep1, True)
  549.    Next i
  550.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  551.    TimerCloseOk = cTimerClose(TimerHandle)
  552. End Sub
  553. Private Sub TestGetBlock()
  554.    Dim intResult        As Integer
  555.    Dim strResult        As String
  556.    Dim strDisplay       As String
  557.    Dim i                As Integer
  558.    Dim Str1             As String
  559.    Dim BlockSize        As Integer
  560.    intResult = 0
  561.    strResult = ""
  562.    strDisplay = ""
  563.      
  564.    Str1 = Text1.Text
  565.    BlockSize = 2
  566.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  567.    strDisplay = strDisplay & "3: '" & cGetBlock(Str1, 3, BlockSize) & "'" & vbCrLf
  568.    strDisplay = strDisplay & "7: '" & cGetBlock(Str1, 7, BlockSize) & "'" & vbCrLf
  569.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  570.    strDisplay = strDisplay & "5: '" & cGetBlock(Str1, 5, BlockSize) & "'" & vbCrLf
  571.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  572.    strDisplay = strDisplay & "0: '" & cGetBlock(Str1, 0, BlockSize) & "'" & vbCrLf & vbCrLf
  573.    BlockSize = 3
  574.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  575.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'" & vbCrLf
  576.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf & vbCrLf
  577.    BlockSize = 4
  578.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (block size '" & BlockSize & "') are " & vbCrLf & vbCrLf
  579.    strDisplay = strDisplay & "2: '" & cGetBlock(Str1, 2, BlockSize) & "'" & vbCrLf
  580.    strDisplay = strDisplay & "1: '" & cGetBlock(Str1, 1, BlockSize) & "'"
  581.    txt_Result = strDisplay
  582.    'time the function
  583.    TimerHandle = cTimerOpen()
  584.    TimerStartOk = cTimerStart(TimerHandle)
  585.    For i = 1 To Iteration
  586.       strResult = cGetBlock(Str1, BlockSize, 3)
  587.    Next i
  588.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  589.    TimerCloseOk = cTimerClose(TimerHandle)
  590. End Sub
  591. Private Sub TestInsertChars()
  592.    Dim intResult        As Integer
  593.    Dim strResult        As String
  594.    Dim strDisplay       As String
  595.    Dim i                As Integer
  596.    Dim Str1             As String
  597.    intResult = 0
  598.    strResult = ""
  599.    strDisplay = ""
  600.      
  601.    Str1 = Text1.Text
  602.    strDisplay = strDisplay & "Insert 'a' from 7 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  603.    strDisplay = strDisplay & cInsertChars(Str1, 7, "a") & vbCrLf & vbCrLf
  604.    strDisplay = strDisplay & "Insert '10$' from 2 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  605.    strDisplay = strDisplay & cInsertChars(Str1, 2, "10$") & vbCrLf & vbCrLf
  606.    strDisplay = strDisplay & "Insert '@' from 21 char into '" & Str1 & "' is " & vbCrLf & vbCrLf
  607.    strDisplay = strDisplay & cInsertChars(Str1, 21, "@") & vbCrLf & vbCrLf
  608.    txt_Result = strDisplay
  609.    'time the function
  610.    TimerHandle = cTimerOpen()
  611.    TimerStartOk = cTimerStart(TimerHandle)
  612.    For i = 1 To Iteration
  613.       strResult = cInsertChars(Str1, 1, "a")
  614.    Next i
  615.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  616.    TimerCloseOk = cTimerClose(TimerHandle)
  617. End Sub
  618. Private Sub TestInsertByMask()
  619.    Dim intResult        As Integer
  620.    Dim strResult        As String
  621.    Dim strDisplay       As String
  622.    Dim i                As Integer
  623.    Dim Str1             As String
  624.    Dim Str2             As String
  625.    Dim Mask1            As String
  626.    intResult = 0
  627.    strResult = ""
  628.    strDisplay = ""
  629.      
  630.    Str1 = "Nr ## Price $###.##"
  631.    Str2 = "0705200"
  632.    Mask1 = "#"
  633.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  634.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  635.    Str1 = Text1.Text
  636.    Str2 = String(cCount(Str1, "/"), "*")
  637.    Mask1 = "/"
  638.    strDisplay = strDisplay & "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  639.    strDisplay = strDisplay & cInsertByMask(Str1, Mask1, Str2) & vbCrLf & vbCrLf
  640.    txt_Result = strDisplay
  641.    'time the function
  642.    TimerHandle = cTimerOpen()
  643.    TimerStartOk = cTimerStart(TimerHandle)
  644.    For i = 1 To Iteration
  645.       strResult = cInsertByMask(Str1, Mask1, Str2)
  646.    Next i
  647.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  648.    TimerCloseOk = cTimerClose(TimerHandle)
  649. End Sub
  650. Private Sub TestInsertBlocks()
  651.    Dim intResult        As Integer
  652.    Dim strResult        As String
  653.    Dim strDisplay       As String
  654.    Dim i                As Integer
  655.    Dim Str1             As String
  656.    Dim Str2             As String
  657.    intResult = 0
  658.    strResult = ""
  659.    strDisplay = ""
  660.      
  661.    Str1 = "A~BC~DEF~GHIJ~"
  662.    Str2 = "a~bc~def~ghij"
  663.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  664.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  665.    Str1 = "A~BC~DEF~GHIJ~"
  666.    Str2 = ""
  667.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  668.    strDisplay = strDisplay & cInsertBlocks(Str1, Str2) & vbCrLf & vbCrLf
  669.    txt_Result = strDisplay
  670.    'time the function
  671.    TimerHandle = cTimerOpen()
  672.    TimerStartOk = cTimerStart(TimerHandle)
  673.    For i = 1 To Iteration
  674.       strResult = cInsertBlocks(Str1, Str2)
  675.    Next i
  676.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  677.    TimerCloseOk = cTimerClose(TimerHandle)
  678. End Sub
  679. Public Sub TestInsertBlocksBy()
  680.    Dim intResult        As Integer
  681.    Dim strResult        As String
  682.    Dim strDisplay       As String
  683.    Dim i                As Integer
  684.    Dim Str1             As String
  685.    Dim Str2             As String
  686.    Dim Sep1             As String
  687.    intResult = 0
  688.    strResult = ""
  689.    strDisplay = ""
  690.      
  691.    Str1 = Text1.Text
  692.    Str2 = "a/bc/def/ghij"
  693.    Sep1 = "/"
  694.    strDisplay = strDisplay + "Insert '" & Str2 & "' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  695.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  696.    Str1 = Text1.Text
  697.    Str2 = ""
  698.    strDisplay = strDisplay + "Insert '' into '" & Str1 & "' is " & vbCrLf & vbCrLf
  699.    strDisplay = strDisplay & cInsertBlocksBy(Str1, Str2, Sep1) & vbCrLf & vbCrLf
  700.    txt_Result = strDisplay
  701.    'time the function
  702.    TimerHandle = cTimerOpen()
  703.    TimerStartOk = cTimerStart(TimerHandle)
  704.    For i = 1 To Iteration
  705.       strResult = cInsertBlocksBy(Str1, Str2, Sep1)
  706.    Next i
  707.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  708.    TimerCloseOk = cTimerClose(TimerHandle)
  709. End Sub
  710. Private Sub TestRemoveOneChar()
  711.    Dim intResult        As Integer
  712.    Dim strResult        As String
  713.    Dim strDisplay       As String
  714.    Dim i                As Integer
  715.    Dim Str1             As String
  716.    intResult = 0
  717.    strResult = ""
  718.    strDisplay = ""
  719.      
  720.    Str1 = Text1.Text
  721.    strDisplay = strDisplay & "Removing the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  722.    strDisplay = strDisplay & cRemoveOneChar(Str1, 7) & vbCrLf & vbCrLf
  723.    Str1 = Text1.Text
  724.    strDisplay = strDisplay & "Removing the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  725.    strDisplay = strDisplay & cRemoveOneChar(Str1, 21) & vbCrLf & vbCrLf
  726.    Str1 = Text1.Text
  727.    strDisplay = strDisplay & "Removing the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  728.    strDisplay = strDisplay & cRemoveOneChar(Str1, 14) & vbCrLf & vbCrLf
  729.    Str1 = Text1.Text
  730.    strDisplay = strDisplay & "Removing the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  731.    strDisplay = strDisplay & cRemoveOneChar(Str1, 0) & vbCrLf & vbCrLf
  732.    Str1 = Text1.Text
  733.    strDisplay = strDisplay & "Removing the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  734.    strDisplay = strDisplay & cRemoveOneChar(Str1, 1)
  735.    txt_Result = strDisplay
  736.    'time the function
  737.    Str1 = Text1.Text
  738.    TimerHandle = cTimerOpen()
  739.    TimerStartOk = cTimerStart(TimerHandle)
  740.    For i = 1 To Iteration
  741.       strResult = cRemoveOneChar(Str1, 7)
  742.    Next i
  743.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  744.    TimerCloseOk = cTimerClose(TimerHandle)
  745. End Sub
  746. Public Sub TestRemoveBlockChar()
  747.    Dim intResult        As Integer
  748.    Dim strResult        As String
  749.    Dim strDisplay       As String
  750.    Dim i                As Integer
  751.    Dim Str1             As String
  752.    intResult = 0
  753.    strResult = ""
  754.    strDisplay = ""
  755.      
  756.    Str1 = Text1.Text
  757.    strDisplay = strDisplay & "Removing 3 chars from the 7 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  758.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 7, 3) & vbCrLf & vbCrLf
  759.    Str1 = Text1.Text
  760.    strDisplay = strDisplay & "Removing 2 chars from the 21 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  761.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 21, 2) & vbCrLf & vbCrLf
  762.    Str1 = Text1.Text
  763.    strDisplay = strDisplay & "Removing 7 chars from the 14 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  764.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 14, 7) & vbCrLf & vbCrLf
  765.    Str1 = Text1.Text
  766.    strDisplay = strDisplay & "Removing 14 chars from the 0 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  767.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 0, 14) & vbCrLf & vbCrLf
  768.    Str1 = Text1.Text
  769.    strDisplay = strDisplay & "Removing 50 chars from the 1 char of '" & Str1 & "' is " & vbCrLf & vbCrLf
  770.    strDisplay = strDisplay & cRemoveBlockChar(Str1, 1, 50)
  771.    txt_Result = strDisplay
  772.    'time the function
  773.    Str1 = Text1.Text
  774.    TimerHandle = cTimerOpen()
  775.    TimerStartOk = cTimerStart(TimerHandle)
  776.    For i = 1 To Iteration
  777.       strResult = cRemoveBlockChar(Str1, 1, 1)
  778.    Next i
  779.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  780.    TimerCloseOk = cTimerClose(TimerHandle)
  781. End Sub
  782. Private Sub TestTokenIn()
  783.    Dim intResult        As Integer
  784.    Dim strResult        As String
  785.    Dim strDisplay       As String
  786.    Dim i                As Integer
  787.    Dim Str1             As String
  788.    Dim Sep1             As String
  789.    intResult = 0
  790.    strResult = ""
  791.    strDisplay = ""
  792.      
  793.    Str1 = Text1.Text
  794.    Sep1 = "/HM"
  795.    strDisplay = strDisplay & "The 3,7,1,5,2,0 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  796.    strDisplay = strDisplay & "3: '" & cTokenIn(Str1, Sep1, 3) & "'" & vbCrLf
  797.    strDisplay = strDisplay & "7: '" & cTokenIn(Str1, Sep1, 7) & "'" & vbCrLf
  798.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  799.    strDisplay = strDisplay & "5: '" & cTokenIn(Str1, Sep1, 5) & "'" & vbCrLf
  800.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  801.    strDisplay = strDisplay & "0: '" & cTokenIn(Str1, Sep1, 0) & "'" & vbCrLf & vbCrLf
  802.    Sep1 = "G"
  803.    strDisplay = strDisplay & "The 1,2 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  804.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'" & vbCrLf
  805.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf & vbCrLf
  806.    Sep1 = "g"
  807.    strDisplay = strDisplay & "The 2,1 blocks of '" & Str1 & "' (separator '" & Sep1 & "') are " & vbCrLf & vbCrLf
  808.    strDisplay = strDisplay & "2: '" & cTokenIn(Str1, Sep1, 2) & "'" & vbCrLf
  809.    strDisplay = strDisplay & "1: '" & cTokenIn(Str1, Sep1, 1) & "'"
  810.    txt_Result = strDisplay
  811.    'time the function
  812.    TimerHandle = cTimerOpen()
  813.    TimerStartOk = cTimerStart(TimerHandle)
  814.    For i = 1 To Iteration
  815.       strResult = cTokenIn(Str1, Sep1, 3)
  816.    Next i
  817.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  818.    TimerCloseOk = cTimerClose(TimerHandle)
  819. End Sub
  820. Private Sub TestOrTokenX()
  821.    Dim intResult        As Integer
  822.    Dim strResult        As String
  823.    Dim strDisplay       As String
  824.    Dim i                As Integer
  825.    Dim Str1             As String
  826.    Dim Str2             As String
  827.    Dim Sep1             As String
  828.    intResult = 0
  829.    strResult = ""
  830.    strDisplay = ""
  831.    Sep1 = "\"
  832.      
  833.    Str1 = "FOX|OVER|THE"
  834.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  835.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  836.    Str1 = "quick|jumps|the"
  837.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  838.    strDisplay = strDisplay & "One of token '" & Str1 & "' (|) in '" & Str2 & "' is " & IIf(cOrToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  839.    Str1 = "FOX\OVER\THE"
  840.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  841.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  842.    Str1 = "quick\jumps\the"
  843.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  844.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  845.    Str1 = "FOX/OVER/THE"
  846.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  847.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  848.    Str1 = "quick\JUMPS\the"
  849.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  850.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  851.    Str1 = LCase$("quick\jumps\THE")
  852.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  853.    strDisplay = strDisplay & "One of token '" & Str1 & "' (\) in '" & Str2 & "' is " & IIf(cOrTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  854.    txt_Result = strDisplay
  855.    'time the function
  856.    TimerHandle = cTimerOpen()
  857.    TimerStartOk = cTimerStart(TimerHandle)
  858.    For i = 1 To Iteration
  859.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  860.    Next i
  861.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  862.    TimerCloseOk = cTimerClose(TimerHandle)
  863. End Sub
  864. Private Sub TestAndTokenX()
  865.    Dim intResult        As Integer
  866.    Dim strResult        As String
  867.    Dim strDisplay       As String
  868.    Dim i                As Integer
  869.    Dim Str1             As String
  870.    Dim Str2             As String
  871.    Dim Sep1             As String
  872.    intResult = 0
  873.    strResult = ""
  874.    strDisplay = ""
  875.      
  876.    Sep1 = "\"
  877.      
  878.    Str1 = "FOX|OVER|THE"
  879.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  880.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  881.    Str1 = "quick|jumps|the"
  882.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  883.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (|) in '" & Str2 & "' are " & IIf(cAndToken(Str2, Str1), "present", "not present") & vbCrLf & vbCrLf
  884.    Str1 = "FOX\OVER\THE"
  885.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  886.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  887.    Str1 = "quick\jumps\the"
  888.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  889.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  890.    Str1 = "FOX/OVER/THE"
  891.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  892.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  893.    Str1 = "quick\JUMPS\the"
  894.    Str2 = "THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG"
  895.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  896.    Str1 = LCase$("quick\jumps\THE")
  897.    Str2 = LCase$("THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG")
  898.    strDisplay = strDisplay & "All tokens '" & Str1 & "' (\) in '" & Str2 & "' are " & IIf(cAndTokenIn(Str2, Str1, Sep1), "present", "not present") & vbCrLf & vbCrLf
  899.    txt_Result = strDisplay
  900.    'time the function
  901.    TimerHandle = cTimerOpen()
  902.    TimerStartOk = cTimerStart(TimerHandle)
  903.    For i = 1 To Iteration
  904.       strResult = cOrTokenIn(Str2, Str1, Sep1)
  905.    Next i
  906.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  907.    TimerCloseOk = cTimerClose(TimerHandle)
  908. End Sub
  909. Private Sub TestReverse()
  910.    Dim intResult        As Integer
  911.    Dim strResult        As String
  912.    Dim strDisplay       As String
  913.    Dim i                As Integer
  914.    Dim Str1             As String
  915.    Dim Str2             As String
  916.    intResult = 0
  917.    strResult = ""
  918.    strDisplay = ""
  919.      
  920.    Str1 = Text1.Text
  921.    Str2 = cReverse(Str1)
  922.    strDisplay = strDisplay & "Reverse of '" & Str1 & "' is " & vbCrLf & vbCrLf
  923.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  924.    strDisplay = strDisplay & "Reverse of '" & Str2 & "' is " & vbCrLf & vbCrLf
  925.    strDisplay = strDisplay & cReverse(Str2) & vbCrLf & vbCrLf
  926.    txt_Result = strDisplay
  927.    'time the function
  928.    TimerHandle = cTimerOpen()
  929.    TimerStartOk = cTimerStart(TimerHandle)
  930.    For i = 1 To Iteration
  931.       strResult = cReverse(Str1)
  932.    Next i
  933.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  934.    TimerCloseOk = cTimerClose(TimerHandle)
  935. End Sub
  936. Private Sub TestMixChars()
  937.    Dim intResult        As Integer
  938.    Dim strResult        As String
  939.    Dim strDisplay       As String
  940.    Dim i                As Integer
  941.    Dim Str1             As String
  942.    Dim Str2             As String
  943.    intResult = 0
  944.    strResult = ""
  945.    strDisplay = ""
  946.      
  947.    Str1 = Text1.Text
  948.    Str2 = cMixChars(Str1)
  949.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  950.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  951.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  952.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  953.    Str1 = "TIME TO WIN (32-Bit)"
  954.    Str2 = cMixChars(Str1)
  955.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  956.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  957.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  958.    strDisplay = strDisplay & cMixChars(Str2) & vbCrLf & vbCrLf
  959.    Str1 = "Under the sky, the sun lights"
  960.    Str2 = cMixChars(Str1)
  961.    strDisplay = strDisplay & "MixChars of '" & Str1 & "' is " & vbCrLf & vbCrLf
  962.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  963.    strDisplay = strDisplay & "MixChars of '" & Str2 & "' is " & vbCrLf & vbCrLf
  964.    strDisplay = strDisplay & cMixChars(Str2)
  965.    txt_Result = strDisplay
  966.    'time the function
  967.    TimerHandle = cTimerOpen()
  968.    TimerStartOk = cTimerStart(TimerHandle)
  969.    For i = 1 To Iteration
  970.       strResult = cMixChars(Str1)
  971.    Next i
  972.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  973.    TimerCloseOk = cTimerClose(TimerHandle)
  974. End Sub
  975. Private Sub TestScrollX()
  976.    Dim intResult        As Integer
  977.    Dim strResult        As String
  978.    Dim strDisplay       As String
  979.    Dim i                As Integer
  980.    Dim Str1             As String
  981.    Dim Str2             As String
  982.    intResult = 0
  983.    strResult = ""
  984.    strDisplay = ""
  985.      
  986.    Str1 = Text1.Text
  987.    Str2 = Text1.Text
  988.    strDisplay = strDisplay & "Scroll 7 times from left into '" & Str1 & "' is " & vbCrLf & vbCrLf
  989.    For i = 1 To 7
  990.       Str2 = cScrollL(Str2)
  991.       strDisplay = strDisplay & Str2 & vbCrLf
  992.    Next i
  993.    strDisplay = strDisplay & vbCrLf
  994.    Str1 = Text1.Text
  995.    Str2 = Text1.Text
  996.    strDisplay = strDisplay & "Scroll 7 times from right into '" & Str1 & "' is " & vbCrLf & vbCrLf
  997.    For i = 1 To 7
  998.       Str2 = cScrollR(Str2)
  999.       strDisplay = strDisplay & Str2 & vbCrLf
  1000.    Next i
  1001.    strDisplay = strDisplay & vbCrLf
  1002.    txt_Result = strDisplay
  1003.    'time the function
  1004.    TimerHandle = cTimerOpen()
  1005.    TimerStartOk = cTimerStart(TimerHandle)
  1006.    For i = 1 To Iteration
  1007.       strResult = cScrollL(Str1)
  1008.    Next i
  1009.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1010.    TimerCloseOk = cTimerClose(TimerHandle)
  1011. End Sub
  1012. Private Sub TestChangeChars()
  1013.    Dim intResult        As Integer
  1014.    Dim strResult        As String
  1015.    Dim strDisplay       As String
  1016.    Dim i                As Integer
  1017.    Dim Str1             As String
  1018.    intResult = 0
  1019.    strResult = ""
  1020.    strDisplay = ""
  1021.      
  1022.    Str1 = Text1.Text
  1023.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1024.    Call cChangeChars(Str1, "AZM", "qyc")
  1025.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1026.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1027.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1028.    Call cChangeChars(Str1, "AZM", "qyc")
  1029.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1030.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1031.    Call cChangeChars(Str1, "qyc", "+-*")
  1032.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1033.    txt_Result = strDisplay
  1034.    'time the function
  1035.    Str1 = Text1.Text
  1036.    TimerHandle = cTimerOpen()
  1037.    TimerStartOk = cTimerStart(TimerHandle)
  1038.    For i = 1 To Iteration
  1039.       Call cChangeChars(Str1, "AZM", "qyc")
  1040.    Next i
  1041.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1042.    TimerCloseOk = cTimerClose(TimerHandle)
  1043. End Sub
  1044. Private Sub TestChangeCharsUntil()
  1045.    Dim intResult        As Integer
  1046.    Dim strResult        As String
  1047.    Dim strDisplay       As String
  1048.    Dim i                As Integer
  1049.    Dim Str1             As String
  1050.    intResult = 0
  1051.    strResult = ""
  1052.    strDisplay = ""
  1053.      
  1054.    Str1 = Text1.Text
  1055.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1056.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1057.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1058.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1059.    strDisplay = strDisplay & "Change 'AZM' into 'qyc' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1060.    Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1061.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1062.    strDisplay = strDisplay & "Change 'qyc' into '+-*' of '" & Str1 & "' until 'N' is " & vbCrLf & vbCrLf
  1063.    Call cChangeCharsUntil(Str1, "qyc", "+-*", "N")
  1064.    strDisplay = strDisplay & Str1 & vbCrLf & vbCrLf
  1065.    txt_Result = strDisplay
  1066.    'time the function
  1067.    Str1 = Text1.Text
  1068.    TimerHandle = cTimerOpen()
  1069.    TimerStartOk = cTimerStart(TimerHandle)
  1070.    For i = 1 To Iteration
  1071.       Call cChangeCharsUntil(Str1, "AZM", "qyc", "N")
  1072.    Next i
  1073.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1074.    TimerCloseOk = cTimerClose(TimerHandle)
  1075. End Sub
  1076. Private Sub TestCheckChars()
  1077.    Dim intResult        As Integer
  1078.    Dim strResult        As String
  1079.    Dim strDisplay       As String
  1080.    Dim i                As Integer
  1081.    Dim Str1             As String
  1082.    intResult = 0
  1083.    strResult = ""
  1084.    strDisplay = ""
  1085.      
  1086.    Str1 = Text1.Text
  1087.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1088.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1089.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1090.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1091.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1092.    strDisplay = strDisplay & "Check 'A','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1093.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "AZ"), "all present", "not all present") & vbCrLf & vbCrLf
  1094.    strDisplay = strDisplay & "Check 'a','Z' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1095.    strDisplay = strDisplay & IIf(cCheckChars(Str1, "aZ"), "all present", "not all present")
  1096.    txt_Result = strDisplay
  1097.    'time the function
  1098.    Str1 = Text1.Text
  1099.    TimerHandle = cTimerOpen()
  1100.    TimerStartOk = cTimerStart(TimerHandle)
  1101.    For i = 1 To Iteration
  1102.       intResult = cCheckChars(Str1, "aZ")
  1103.    Next i
  1104.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1105.    TimerCloseOk = cTimerClose(TimerHandle)
  1106. End Sub
  1107. Private Sub TestFilterChars()
  1108.    Dim intResult        As Integer
  1109.    Dim strResult        As String
  1110.    Dim strDisplay       As String
  1111.    Dim i                As Integer
  1112.    Dim Str1             As String
  1113.    intResult = 0
  1114.    strResult = ""
  1115.    strDisplay = ""
  1116.      
  1117.    Str1 = Text1.Text
  1118.    strDisplay = strDisplay & "Filter 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1119.    strDisplay = strDisplay & cFilterChars(Str1, "B/") & vbCrLf & vbCrLf
  1120.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1121.    strDisplay = strDisplay & "Filter 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1122.    strDisplay = strDisplay & cFilterChars(Str1, "BY")
  1123.    txt_Result = strDisplay
  1124.    'time the function
  1125.    Str1 = Text1.Text
  1126.    TimerHandle = cTimerOpen()
  1127.    TimerStartOk = cTimerStart(TimerHandle)
  1128.    For i = 1 To Iteration
  1129.       strResult = cFilterChars(Str1, "B/")
  1130.    Next i
  1131.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1132.    TimerCloseOk = cTimerClose(TimerHandle)
  1133. End Sub
  1134. Private Sub TestFilterNotChars()
  1135.    Dim intResult        As Integer
  1136.    Dim strResult        As String
  1137.    Dim strDisplay       As String
  1138.    Dim i                As Integer
  1139.    Dim Str1             As String
  1140.    intResult = 0
  1141.    strResult = ""
  1142.    strDisplay = ""
  1143.      
  1144.    Str1 = Text1.Text
  1145.    strDisplay = strDisplay & "Filter not 'B','/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1146.    strDisplay = strDisplay & cFilterNotChars(Str1, "B/") & vbCrLf & vbCrLf
  1147.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1148.    strDisplay = strDisplay & "Filter not 'B','Y' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1149.    strDisplay = strDisplay & cFilterNotChars(Str1, "BY")
  1150.    txt_Result = strDisplay
  1151.    'time the function
  1152.    Str1 = Text1.Text
  1153.    TimerHandle = cTimerOpen()
  1154.    TimerStartOk = cTimerStart(TimerHandle)
  1155.    For i = 1 To Iteration
  1156.       strResult = cFilterNotChars(Str1, "B/")
  1157.    Next i
  1158.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1159.    TimerCloseOk = cTimerClose(TimerHandle)
  1160. End Sub
  1161. Private Sub TestFilterBlocks()
  1162.    Dim intResult        As Integer
  1163.    Dim strResult        As String
  1164.    Dim strDisplay       As String
  1165.    Dim i                As Integer
  1166.    Dim Str1             As String
  1167.    intResult = 0
  1168.    strResult = ""
  1169.    strDisplay = ""
  1170.      
  1171.    Str1 = Text1.Text
  1172.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1173.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1174.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1175.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'" & vbCrLf & vbCrLf
  1176.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1177.    strDisplay = strDisplay & "Filter blocks between '/' and '/' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1178.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "//") & "'" & vbCrLf & vbCrLf
  1179.    strDisplay = strDisplay & "Filter blocks between 'B' and 'I' in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1180.    strDisplay = strDisplay & "'" & cFilterBlocks(Str1, "BI") & "'"
  1181.    txt_Result = strDisplay
  1182.    'time the function
  1183.    Str1 = Text1.Text
  1184.    TimerHandle = cTimerOpen()
  1185.    TimerStartOk = cTimerStart(TimerHandle)
  1186.    For i = 1 To Iteration
  1187.       strResult = cFilterBlocks(Str1, "BI")
  1188.    Next i
  1189.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1190.    TimerCloseOk = cTimerClose(TimerHandle)
  1191. End Sub
  1192. Private Sub TestResizeString()
  1193.    Dim intResult        As Integer
  1194.    Dim strResult        As String
  1195.    Dim strDisplay       As String
  1196.    Dim i                As Integer
  1197.    Dim Str1             As String
  1198.    intResult = 0
  1199.    strResult = ""
  1200.    strDisplay = ""
  1201.      
  1202.    Str1 = Text1.Text
  1203.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1204.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1205.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1206.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1207.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1208.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1209.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1210.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'" & vbCrLf & vbCrLf
  1211.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1212.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1213.    strDisplay = strDisplay & "'" & cResizeString(Str1, 5) & "'" & vbCrLf & vbCrLf
  1214.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1215.    strDisplay = strDisplay & "'" & cResizeString(Str1, 10) & "'" & vbCrLf & vbCrLf
  1216.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1217.    strDisplay = strDisplay & "'" & cResizeString(Str1, 50) & "'" & vbCrLf & vbCrLf
  1218.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1219.    strDisplay = strDisplay & "'" & cResizeString(Str1, -1) & "'"
  1220.    txt_Result = strDisplay
  1221.    'time the function
  1222.    Str1 = Text1.Text
  1223.    TimerHandle = cTimerOpen()
  1224.    TimerStartOk = cTimerStart(TimerHandle)
  1225.    For i = 1 To Iteration
  1226.       strResult = cResizeString(Str1, 5)
  1227.    Next i
  1228.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1229.    TimerCloseOk = cTimerClose(TimerHandle)
  1230. End Sub
  1231. Private Sub TestResizeStringAndFill()
  1232.    Dim intResult        As Integer
  1233.    Dim strResult        As String
  1234.    Dim strDisplay       As String
  1235.    Dim i                As Integer
  1236.    Dim Str1             As String
  1237.    intResult = 0
  1238.    strResult = ""
  1239.    strDisplay = ""
  1240.      
  1241.    Str1 = Text1.Text
  1242.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1243.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1244.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1245.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1246.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1247.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1248.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1249.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'" & vbCrLf & vbCrLf
  1250.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1251.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 5 chars is " & vbCrLf & vbCrLf
  1252.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 5, "*") & "'" & vbCrLf & vbCrLf
  1253.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 10 chars is " & vbCrLf & vbCrLf
  1254.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 10, "*") & "'" & vbCrLf & vbCrLf
  1255.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to 50 chars is " & vbCrLf & vbCrLf
  1256.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, 50, "*") & "'" & vbCrLf & vbCrLf
  1257.    strDisplay = strDisplay & "'" & Str1 & "' resized from " & Len(Str1) & " to -1 chars is " & vbCrLf & vbCrLf
  1258.    strDisplay = strDisplay & "'" & cResizeStringAndFill(Str1, -1, "*") & "'"
  1259.    txt_Result = strDisplay
  1260.    'time the function
  1261.    Str1 = Text1.Text
  1262.    TimerHandle = cTimerOpen()
  1263.    TimerStartOk = cTimerStart(TimerHandle)
  1264.    For i = 1 To Iteration
  1265.       strResult = cResizeStringAndFill(Str1, 50, "*")
  1266.    Next i
  1267.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1268.    TimerCloseOk = cTimerClose(TimerHandle)
  1269. End Sub
  1270. Private Sub TestCreateAndFill()
  1271.    Dim intResult        As Integer
  1272.    Dim strResult        As String
  1273.    Dim strDisplay       As String
  1274.    Dim i                As Integer
  1275.    Dim Str1             As String
  1276.    intResult = 0
  1277.    strResult = ""
  1278.    strDisplay = ""
  1279.      
  1280.    Str1 = Text1.Text
  1281.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1282.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1283.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1284.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'" & vbCrLf & vbCrLf
  1285.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1286.    strDisplay = strDisplay & "Create and Fill a string of 60 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1287.    strDisplay = strDisplay & "'" & cCreateAndFill(60, Str1) & "'" & vbCrLf & vbCrLf
  1288.    strDisplay = strDisplay & "Create and Fill a string of 40 chars with '" & Str1 & "' is " & vbCrLf & vbCrLf
  1289.    strDisplay = strDisplay & "'" & cCreateAndFill(40, Str1) & "'"
  1290.    txt_Result = strDisplay
  1291.    'time the function
  1292.    Str1 = Text1.Text
  1293.    TimerHandle = cTimerOpen()
  1294.    TimerStartOk = cTimerStart(TimerHandle)
  1295.    For i = 1 To Iteration
  1296.       strResult = cCreateAndFill(40, Str1)
  1297.    Next i
  1298.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1299.    TimerCloseOk = cTimerClose(TimerHandle)
  1300. End Sub
  1301. Private Sub TestFill()
  1302.    Dim intResult        As Integer
  1303.    Dim strResult        As String
  1304.    Dim strDisplay       As String
  1305.    Dim i                As Integer
  1306.    Dim Str1             As String
  1307.    intResult = 0
  1308.    strResult = ""
  1309.    strDisplay = ""
  1310.      
  1311.    Str1 = Text1.Text
  1312.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '*=' is " & vbCrLf & vbCrLf
  1313.    Call cFill(Str1, "*=")
  1314.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1315.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '=*=' is " & vbCrLf & vbCrLf
  1316.    Call cFill(Str1, "=*=")
  1317.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1318.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1319.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '7516' is " & vbCrLf & vbCrLf
  1320.    Call cFill(Str1, "7516")
  1321.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1322.    strDisplay = strDisplay & "Fill of '" & Str1 & "' with '$61.00' is " & vbCrLf & vbCrLf
  1323.    Call cFill(Str1, "$61.00")
  1324.    strDisplay = strDisplay & "'" & Str1 & "'"
  1325.    txt_Result = strDisplay
  1326.    'time the function
  1327.    Str1 = Text1.Text
  1328.    TimerHandle = cTimerOpen()
  1329.    TimerStartOk = cTimerStart(TimerHandle)
  1330.    For i = 1 To Iteration
  1331.       Call cFill(Str1, "*=")
  1332.    Next i
  1333.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1334.    TimerCloseOk = cTimerClose(TimerHandle)
  1335. End Sub
  1336. Private Sub TestLrc()
  1337.    Dim intResult        As Integer
  1338.    Dim strResult        As String
  1339.    Dim strDisplay       As String
  1340.    Dim i                As Integer
  1341.    Dim Str1             As String
  1342.    intResult = 0
  1343.    strResult = ""
  1344.    strDisplay = ""
  1345.      
  1346.    Str1 = Text1.Text
  1347.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1348.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1349.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'" & vbCrLf & vbCrLf
  1350.    Str1 = Chr$(2) & "0a12721536"
  1351.    strDisplay = strDisplay & "Lrc for '" & Str1 & "' is '" & cLrc(Str1) & "'"
  1352.    txt_Result = strDisplay
  1353.    'time the function
  1354.    Str1 = Text1.Text
  1355.    TimerHandle = cTimerOpen()
  1356.    TimerStartOk = cTimerStart(TimerHandle)
  1357.    For i = 1 To Iteration
  1358.       strResult = cLrc(Str1)
  1359.    Next i
  1360.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1361.    TimerCloseOk = cTimerClose(TimerHandle)
  1362. End Sub
  1363. Private Sub TestCompress()
  1364.    Dim intResult        As Integer
  1365.    Dim strResult        As String
  1366.    Dim strDisplay       As String
  1367.    Dim i                As Integer
  1368.    Dim Str1             As String
  1369.    intResult = 0
  1370.    strResult = ""
  1371.    strDisplay = ""
  1372.      
  1373.    Str1 = Text1.Text
  1374.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1375.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1376.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1377.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1378.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1379.    Str1 = "A " & Chr$(9) & "BC  "
  1380.    strDisplay = strDisplay & "Filter chr(0),chr(9),chr(32) in '" & Str1 & "' is " & vbCrLf & vbCrLf
  1381.    strDisplay = strDisplay & "'" & cCompress(Str1) & "'" & vbCrLf & vbCrLf
  1382.    txt_Result = strDisplay
  1383.    'time the function
  1384.    Str1 = Text1.Text
  1385.    TimerHandle = cTimerOpen()
  1386.    TimerStartOk = cTimerStart(TimerHandle)
  1387.    For i = 1 To Iteration
  1388.       strResult = cCompress(Str1)
  1389.    Next i
  1390.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1391.    TimerCloseOk = cTimerClose(TimerHandle)
  1392. End Sub
  1393. Public Sub TestCompressTab()
  1394.    Dim intResult        As Integer
  1395.    Dim strResult        As String
  1396.    Dim strDisplay       As String
  1397.    Dim i                As Integer
  1398.    Dim Str1             As String
  1399.    Dim Str2             As String
  1400.    Dim Str3             As String
  1401.    intResult = 0
  1402.    strResult = ""
  1403.    strDisplay = ""
  1404.      
  1405.    Str1 = "A      BC   DEF  GHIJ  "
  1406.    For i = 1 To 6
  1407.       Str2 = cCompressTab(Str1, i)
  1408.       Str3 = Str2
  1409.       Call cChangeChars(Str3, vbTab, "
  1410.       strDisplay = strDisplay & "Compress tab (" & i & " chars) into '" & Str1 & "' is '" & Str3 & "'" & vbCrLf
  1411.       strDisplay = strDisplay & "Expand tab (" & i & " chars) into '" & Str3 & "' is '" & cExpandTab(Str2, i) & "'" & vbCrLf & vbCrLf
  1412.    Next i
  1413.    txt_Result = strDisplay
  1414.    'time the function
  1415.    Str1 = Text1.Text
  1416.    TimerHandle = cTimerOpen()
  1417.    TimerStartOk = cTimerStart(TimerHandle)
  1418.    For i = 1 To Iteration
  1419.       strResult = cCompressTab(Str1, 3)
  1420.    Next i
  1421.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1422.    TimerCloseOk = cTimerClose(TimerHandle)
  1423. End Sub
  1424. Private Sub TestCompact()
  1425.    Dim intResult        As Integer
  1426.    Dim strResult        As String
  1427.    Dim strDisplay       As String
  1428.    Dim i                As Integer
  1429.    Dim Str1             As String
  1430.    Dim Str2             As String
  1431.    intResult = 0
  1432.    strResult = ""
  1433.    strDisplay = ""
  1434.      
  1435.    Str1 = "987654321"
  1436.    Str2 = cCompact(Str1)
  1437.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  1438.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  1439.    Str1 = "1234567890"
  1440.    Str2 = cCompact(Str1)
  1441.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  1442.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  1443.    Str1 = Text1.Text
  1444.    Str2 = cCompact(Str1)
  1445.    strDisplay = strDisplay & "Compact '" & Str1 & "' is '" & Str2 & "'" & vbCrLf & vbCrLf
  1446.    strDisplay = strDisplay & "Uncompact '" & Str2 & "' is '" & cUncompact(Str2) & "'" & vbCrLf & vbCrLf
  1447.    txt_Result = strDisplay
  1448.    'time the function
  1449.    Str1 = Text1.Text
  1450.    TimerHandle = cTimerOpen()
  1451.    TimerStartOk = cTimerStart(TimerHandle)
  1452.    For i = 1 To Iteration
  1453.       strResult = cCompact(Str1)
  1454.    Next i
  1455.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1456.    TimerCloseOk = cTimerClose(TimerHandle)
  1457. End Sub
  1458. Private Sub TestAlign()
  1459.    Dim intResult        As Integer
  1460.    Dim strResult        As String
  1461.    Dim strDisplay       As String
  1462.    Dim i                As Integer
  1463.    Dim Str1             As String
  1464.    Dim Str2             As String
  1465.    intResult = 0
  1466.    strResult = ""
  1467.    strDisplay = ""
  1468.      
  1469.    Str1 = "T2WIN-32"
  1470.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1471.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 30) & "'" & vbCrLf & vbCrLf
  1472.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1473.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 30) & "'" & vbCrLf & vbCrLf
  1474.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1475.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 30) & "'" & vbCrLf & vbCrLf
  1476.    Str1 = Text1.Text
  1477.    strDisplay = strDisplay & "Left Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1478.    strDisplay = strDisplay & "'" & cAlign(Str1, -1, 50) & "'" & vbCrLf & vbCrLf
  1479.    strDisplay = strDisplay & "Center Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1480.    strDisplay = strDisplay & "'" & cAlign(Str1, 0, 50) & "'" & vbCrLf & vbCrLf
  1481.    strDisplay = strDisplay & "Right Align of '" & Str1 & "' is " & vbCrLf & vbCrLf
  1482.    strDisplay = strDisplay & "'" & cAlign(Str1, 1, 50) & "'"
  1483.    txt_Result = strDisplay
  1484.    'time the function
  1485.    Str1 = Text1.Text
  1486.    TimerHandle = cTimerOpen()
  1487.    TimerStartOk = cTimerStart(TimerHandle)
  1488.    For i = 1 To Iteration
  1489.       strResult = cAlign(Str1, 1, 30)
  1490.    Next i
  1491.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1492.    TimerCloseOk = cTimerClose(TimerHandle)
  1493. End Sub
  1494. Private Sub TestProperName()
  1495.    Dim intResult        As Integer
  1496.    Dim strResult        As String
  1497.    Dim strDisplay       As String
  1498.    Dim i                As Integer
  1499.    Dim Str1             As String
  1500.    Dim Str2             As String
  1501.    intResult = 0
  1502.    strResult = ""
  1503.    strDisplay = ""
  1504.      
  1505.    Str1 = Text1.Text
  1506.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1507.    Str1 = "John fitz,jr"
  1508.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1509.    Str1 = "john Fitz, jr"
  1510.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1511.    Str1 = "macdonald"
  1512.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1) & vbCrLf & vbCrLf
  1513.    Str1 = "mac donald"
  1514.    strDisplay = strDisplay + "ProperName of '" & Str1 & "' is " & cProperName(Str1)
  1515.                   
  1516.    txt_Result = strDisplay
  1517.    'time the function
  1518.    Str1 = Text1.Text
  1519.    TimerHandle = cTimerOpen()
  1520.    TimerStartOk = cTimerStart(TimerHandle)
  1521.    For i = 1 To Iteration
  1522.       strResult = cProperName(Str1)
  1523.    Next i
  1524.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1525.    TimerCloseOk = cTimerClose(TimerHandle)
  1526. End Sub
  1527. Private Sub TestProperName2()
  1528.    Dim intResult        As Integer
  1529.    Dim strResult        As String
  1530.    Dim strDisplay       As String
  1531.    Dim i                As Integer
  1532.    Dim Str1             As String
  1533.    Dim Str2             As String
  1534.    intResult = 0
  1535.    strResult = ""
  1536.    strDisplay = ""
  1537.      
  1538.    Str1 = Text1.Text
  1539.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  1540.    Str1 = "JOHN FITZ,JR"
  1541.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_UPPERCASE Or PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1542.    Str1 = "john Fitz,jr"
  1543.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1544.    Str1 = "macdonald"
  1545.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  1546.    Str1 = "mac donald"
  1547.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", 0) & "'" & vbCrLf & vbCrLf
  1548.    Str1 = "a.l. greene jr."
  1549.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1550.    Str1 = "shale and sandstone and till"
  1551.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1552.    Str1 = "a sandstone or a shale"
  1553.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "the/or/of/a/an/and", PN_PUNCTUATION) & "'" & vbCrLf & vbCrLf
  1554.    Str1 = "RR2 BARRHEAD"
  1555.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "rr2", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL) & "'" & vbCrLf & vbCrLf
  1556.    Str1 = "ANDY MACDONALD"
  1557.    strDisplay = strDisplay + "ProperName2 of '" & Str1 & "' is '" & cProperName2(Str1, "mac", PN_UPPERCASE Or PN_PUNCTUATION Or PN_KEEP_ORIGINAL Or PN_ONLY_LEADER_SPACE) & "'"
  1558.                   
  1559.    txt_Result = strDisplay
  1560.    'time the function
  1561.    Str1 = Text1.Text
  1562.    TimerHandle = cTimerOpen()
  1563.    TimerStartOk = cTimerStart(TimerHandle)
  1564.    For i = 1 To Iteration
  1565.       strResult = cProperName2(Str1, "", 0)
  1566.    Next i
  1567.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1568.    TimerCloseOk = cTimerClose(TimerHandle)
  1569. End Sub
  1570. Private Sub TestStringSAR()
  1571.    Dim intResult        As Integer
  1572.    Dim strResult        As String
  1573.    Dim strDisplay       As String
  1574.    Dim i                As Integer
  1575.    Dim Str1             As String
  1576.    Dim Str2             As String
  1577.    intResult = 0
  1578.    strResult = ""
  1579.    strDisplay = ""
  1580.      
  1581.    Str1 = "T2WIN-32, T2WIN-32, T2WIN-32, T2WIN-32 IS A DLL"
  1582.    Str2 = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  1583.    strDisplay = strDisplay & "Replace 'T2WIN-32' by 't2win-32'" & vbCrLf
  1584.    strDisplay = strDisplay & "     in" & vbCrLf
  1585.    strDisplay = strDisplay & Str1 & vbCrLf
  1586.    strDisplay = strDisplay & "     is" & vbCrLf
  1587.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1588.    Str2 = cStringSAR(Str1, "2W", "IME TO W", True)
  1589.    strDisplay = strDisplay & "Replace '2W' by 'IME TO W'" & vbCrLf
  1590.    strDisplay = strDisplay & "     in" & vbCrLf
  1591.    strDisplay = strDisplay & Str1 & vbCrLf
  1592.    strDisplay = strDisplay & "     is" & vbCrLf
  1593.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1594.    Str2 = cStringSAR(Str1, "T2WIN-32", "", True)
  1595.    strDisplay = strDisplay & "Replace 'T2WIN-32, ' by ''" & vbCrLf
  1596.    strDisplay = strDisplay & "     in" & vbCrLf
  1597.    strDisplay = strDisplay & Str1 & vbCrLf
  1598.    strDisplay = strDisplay & "     is" & vbCrLf
  1599.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1600.    Str2 = cStringSAR(Str1, "I", "i", False)
  1601.    strDisplay = strDisplay & "Replace 'I' by 'i'" & vbCrLf
  1602.    strDisplay = strDisplay & "     in" & vbCrLf
  1603.    strDisplay = strDisplay & Str1 & vbCrLf
  1604.    strDisplay = strDisplay & "     is" & vbCrLf
  1605.    strDisplay = strDisplay & Str2 & vbCrLf & vbCrLf
  1606.    txt_Result = strDisplay
  1607.    'time the function
  1608.    Str1 = Text1.Text
  1609.    TimerHandle = cTimerOpen()
  1610.    TimerStartOk = cTimerStart(TimerHandle)
  1611.    For i = 1 To Iteration
  1612.       strResult = cStringSAR(Str1, "T2WIN-32", "t2win-32", False)
  1613.    Next i
  1614.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1615.    TimerCloseOk = cTimerClose(TimerHandle)
  1616. End Sub
  1617. Private Sub TestToHexa()
  1618.    Dim intResult        As Integer
  1619.    Dim strResult        As String
  1620.    Dim strDisplay       As String
  1621.    Dim i                As Integer
  1622.    Dim Str1             As String
  1623.    Dim Str2             As String
  1624.    intResult = 0
  1625.    strResult = ""
  1626.    strDisplay = ""
  1627.    Str1 = Text1.Text
  1628.    Str2 = cToHexa(Str1)
  1629.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1630.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1631.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1632.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  1633.    Str1 = "ABCDEFGH"
  1634.    Str2 = cToHexa(Str1)
  1635.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1636.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1637.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1638.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'" & vbCrLf & vbCrLf
  1639.    Str1 = "01234567890"
  1640.    Str2 = cToHexa(Str1)
  1641.    strDisplay = strDisplay & "To Hexa of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1642.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1643.    strDisplay = strDisplay & "From Hexa of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1644.    strDisplay = strDisplay & "'" & cFromHexa(Str2) & "'"
  1645.    txt_Result = strDisplay
  1646.    'time the function
  1647.    Str1 = Text1.Text
  1648.    TimerHandle = cTimerOpen()
  1649.    TimerStartOk = cTimerStart(TimerHandle)
  1650.    For i = 1 To Iteration
  1651.       strResult = cToHexa(Str1)
  1652.    Next i
  1653.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1654.    TimerCloseOk = cTimerClose(TimerHandle)
  1655. End Sub
  1656. Private Sub TestRomanArabic()
  1657.    Dim intResult        As Integer
  1658.    Dim strResult        As String
  1659.    Dim strDisplay       As String
  1660.    Dim i                As Integer
  1661.    Dim Str1             As String
  1662.    Dim Value            As Integer
  1663.    intResult = 0
  1664.    strResult = ""
  1665.    strDisplay = ""
  1666.    Str1 = UCase$(cArabicToRoman(Year(Int(Now))))
  1667.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  1668.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) - 1))
  1669.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  1670.    Str1 = UCase$(cArabicToRoman(Year(Int(Now)) + 1))
  1671.    strDisplay = strDisplay & Str1 & " in Arabic is " & cRomanToArabic(LCase$(Str1)) & vbCrLf & vbCrLf
  1672.    Value = Year(Int(Now))
  1673.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  1674.    Value = Year(Int(Now)) - 1
  1675.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  1676.    Value = Year(Int(Now)) + 1
  1677.    strDisplay = strDisplay & Value & " in Roman is " & UCase$(cArabicToRoman(Value)) & vbCrLf & vbCrLf
  1678.    txt_Result = strDisplay
  1679.    'time the function
  1680.    Str1 = Text1.Text
  1681.    TimerHandle = cTimerOpen()
  1682.    TimerStartOk = cTimerStart(TimerHandle)
  1683.    For i = 1 To Iteration
  1684.       strResult = cArabicToRoman(1996)
  1685.    Next i
  1686.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1687.    TimerCloseOk = cTimerClose(TimerHandle)
  1688. End Sub
  1689. Private Sub TestAsciiEbcdic()
  1690.    Dim intResult        As Integer
  1691.    Dim strResult        As String
  1692.    Dim strDisplay       As String
  1693.    Dim i                As Integer
  1694.    Dim Str1             As String
  1695.    Dim Str2             As String
  1696.    intResult = 0
  1697.    strResult = ""
  1698.    strDisplay = ""
  1699.    Str1 = Text1.Text
  1700.    Str2 = Str1
  1701.    Call cCnvASCIItoEBCDIC(Str2)
  1702.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1703.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1704.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1705.    Call cCnvEBCDICtoASCII(Str2)
  1706.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1707.    Str1 = "ABCDEFGH"
  1708.    Str2 = Str1
  1709.    Call cCnvASCIItoEBCDIC(Str2)
  1710.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1711.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1712.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1713.    Call cCnvEBCDICtoASCII(Str2)
  1714.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1715.    Str1 = "01234567890"
  1716.    Str2 = Str1
  1717.    Call cCnvASCIItoEBCDIC(Str2)
  1718.    strDisplay = strDisplay & "To EBCDIC of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1719.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  1720.    strDisplay = strDisplay & "To ASCII of '" & Str2 & "' is" & vbCrLf & vbCrLf
  1721.    Call cCnvEBCDICtoASCII(Str2)
  1722.    strDisplay = strDisplay & "'" & Str2 & "'"
  1723.    txt_Result = strDisplay
  1724.    'time the function
  1725.    Str1 = Text1.Text
  1726.    TimerHandle = cTimerOpen()
  1727.    TimerStartOk = cTimerStart(TimerHandle)
  1728.    For i = 1 To Iteration
  1729.       Call cCnvASCIItoEBCDIC(Str1)
  1730.    Next i
  1731.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1732.    TimerCloseOk = cTimerClose(TimerHandle)
  1733. End Sub
  1734. Private Sub TestPatternMatch()
  1735.    Dim intResult        As Integer
  1736.    Dim strResult        As String
  1737.    Dim strDisplay       As String
  1738.    Dim i                As Integer
  1739.    Dim Str1             As String
  1740.    Dim Str2             As String
  1741.    intResult = 0
  1742.    strResult = ""
  1743.    strDisplay = ""
  1744.    Str1 = "Under the blue sky, the sun lights"
  1745.    strDisplay = "PatternMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  1746.    Str2 = "*"
  1747.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1748.    Str2 = "*??*???*?"
  1749.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1750.    Str2 = "*Under*"
  1751.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1752.    Str2 = "*sky*"
  1753.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1754.    Str2 = "*lights"
  1755.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1756.    Str2 = "??der*sky*ligh??*"
  1757.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1758.    Str2 = "Under?the * s??,*"
  1759.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  1760.    Str2 = "*under*"
  1761.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1762.    Str2 = "Under*sun"
  1763.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf
  1764.    Str2 = "Under t??e*"
  1765.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternMatch(Str1, Str2) & vbCrLf & vbCrLf
  1766.    txt_Result = strDisplay
  1767.    'time the function
  1768.    Str2 = "Under?the * s??,*"
  1769.    TimerHandle = cTimerOpen()
  1770.    TimerStartOk = cTimerStart(TimerHandle)
  1771.    For i = 1 To Iteration
  1772.       intResult = cPatternMatch(Str1, Str2)
  1773.    Next i
  1774.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1775.    TimerCloseOk = cTimerClose(TimerHandle)
  1776. End Sub
  1777. Private Sub TestPatternExtMatch()
  1778.    Dim intResult        As Integer
  1779.    Dim strResult        As String
  1780.    Dim strDisplay       As String
  1781.    Dim i                As Integer
  1782.    Dim Str1             As String
  1783.    Dim Str2             As String
  1784.    intResult = 0
  1785.    strResult = ""
  1786.    strDisplay = ""
  1787.    Str1 = "Under the blue sky, the sun lights"
  1788.    strDisplay = "PatternExtMatch '" & Str1 & "' with" & vbCrLf & vbCrLf
  1789.    Str2 = "*"
  1790.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1791.    Str2 = "*??*???*?"
  1792.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1793.    Str2 = "*Under*"
  1794.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1795.    Str2 = "*sky*"
  1796.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1797.    Str2 = "*lights"
  1798.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1799.    Str2 = "??der*sky*ligh??*"
  1800.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1801.    Str2 = "Under?the * s??,*"
  1802.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1803.    Str2 = "'U-U''a-z''a-z''a-z''a-z'?the *"
  1804.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1805.    Str2 = "'U-U''!A-Z''^A-Z''^A-Z''!A-Z'?the *'s-s'"
  1806.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1807.    Str2 = "~55~6E*~73"
  1808.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1809.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rstu'"
  1810.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1811.    Str2 = "Under?the *'~72~73~74~75'"
  1812.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  1813.    Str2 = "*under*"
  1814.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1815.    Str2 = "Under*sun"
  1816.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1817.    Str2 = "Under t??e*"
  1818.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1819.    Str2 = "'U-U''!a-z''^A-Z''^A-Z''!A-Z'?the *'!s-s'"
  1820.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1821.    Str2 = "~55~6G*~73"
  1822.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1823.    Str2 = "'Uu''Nn''dD''eE''opqrst'?the *'rStu'"
  1824.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf
  1825.    Str2 = "Under?the *'~72~53~74~75'"
  1826.    strDisplay = strDisplay & "'" & Str2 & "'  is " & cPatternExtMatch(Str1, Str2) & vbCrLf & vbCrLf
  1827.    txt_Result = strDisplay
  1828.    'time the function
  1829.    Str2 = "Under?the * s??,*"
  1830.    TimerHandle = cTimerOpen()
  1831.    TimerStartOk = cTimerStart(TimerHandle)
  1832.    For i = 1 To Iteration
  1833.       intResult = cPatternExtMatch(Str1, Str2)
  1834.    Next i
  1835.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1836.    TimerCloseOk = cTimerClose(TimerHandle)
  1837. End Sub
  1838. Private Sub TestCheckNumericity()
  1839.    Dim intResult        As Integer
  1840.    Dim strResult        As String
  1841.    Dim strDisplay       As String
  1842.    Dim i                As Integer
  1843.    Dim Str1             As String
  1844.    intResult = 0
  1845.    strResult = ""
  1846.    strDisplay = ""
  1847.      
  1848.    Str1 = Text1.Text
  1849.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1850.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1851.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  1852.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1853.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1854.    Str1 = "1234567890"
  1855.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1856.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1857.    Str1 = "-1234567890"
  1858.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1859.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1860.    Str1 = "+12345.67890"
  1861.    strDisplay = strDisplay & "'" & Str1 & "' is "
  1862.    strDisplay = strDisplay & IIf(cCheckNumericity(Str1), "Numeric", "not Numeric") & vbCrLf & vbCrLf
  1863.    txt_Result = strDisplay
  1864.    'time the function
  1865.    Str1 = Text1.Text
  1866.    TimerHandle = cTimerOpen()
  1867.    TimerStartOk = cTimerStart(TimerHandle)
  1868.    For i = 1 To Iteration
  1869.       intResult = cCheckNumericity(Str1)
  1870.    Next i
  1871.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1872.    TimerCloseOk = cTimerClose(TimerHandle)
  1873. End Sub
  1874. Private Sub TestAlphaDigit()
  1875.    Dim intResult        As Integer
  1876.    Dim strResult        As String
  1877.    Dim strDisplay       As String
  1878.    Dim i                As Integer
  1879.    Dim Str1             As String
  1880.    intResult = 0
  1881.    strResult = ""
  1882.    strDisplay = ""
  1883.      
  1884.    Str1 = "1234567890"
  1885.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  1886.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  1887.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  1888.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'" & vbCrLf & vbCrLf & vbCrLf
  1889.    Str1 = Text1.Text
  1890.    strDisplay = strDisplay & "Add digit in '" & Str1 & "' is '" & cAddDigit(Str1) & "'" & vbCrLf & vbCrLf
  1891.    strDisplay = strDisplay & "Num digit in '" & Str1 & "' is '" & cNumDigit(Str1) & "'" & vbCrLf & vbCrLf
  1892.    strDisplay = strDisplay & "Cpl digit in '" & Str1 & "' is '" & cCplDigit(Str1) & "'" & vbCrLf & vbCrLf
  1893.    strDisplay = strDisplay & "Cpl alpha in '" & Str1 & "' is '" & cCplAlpha(Str1) & "'"
  1894.    txt_Result = strDisplay
  1895.    'time the function
  1896.    Str1 = Text1.Text
  1897.    TimerHandle = cTimerOpen()
  1898.    TimerStartOk = cTimerStart(TimerHandle)
  1899.    For i = 1 To Iteration
  1900.       intResult = cAddDigit(Str1)
  1901.    Next i
  1902.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1903.    TimerCloseOk = cTimerClose(TimerHandle)
  1904. End Sub
  1905. Private Sub TestH2X()
  1906.    Dim intResult        As Integer
  1907.    Dim strResult        As String
  1908.    Dim strDisplay       As String
  1909.    Dim i                As Integer
  1910.    Dim Str1             As String
  1911.    intResult = 0
  1912.    strResult = ""
  1913.    strDisplay = ""
  1914.      
  1915.    strDisplay = "Hexa to Integer" & vbCrLf & vbCrLf
  1916.    Str1 = "0"
  1917.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1918.    Str1 = "1"
  1919.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1920.    Str1 = "A"
  1921.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1922.    Str1 = "A1"
  1923.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1924.    Str1 = "A1B"
  1925.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1926.    Str1 = "7FFF"
  1927.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1928.    Str1 = "A1B2"
  1929.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf
  1930.    Str1 = "FFFF"
  1931.    strDisplay = strDisplay & Str1 & " -> " & cH2I(Str1) & vbCrLf & vbCrLf
  1932.    strDisplay = strDisplay & "Hexa to Long" & vbCrLf & vbCrLf
  1933.    Str1 = "0"
  1934.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1935.    Str1 = "1"
  1936.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1937.    Str1 = "A"
  1938.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1939.    Str1 = "A1"
  1940.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1941.    Str1 = "A1B"
  1942.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1943.    Str1 = "A1B2"
  1944.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1945.    Str1 = "7FFFFFFF"
  1946.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1947.    Str1 = "B2A1A1B2"
  1948.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf
  1949.    Str1 = "FFFFFFFF"
  1950.    strDisplay = strDisplay & Str1 & " -> " & cH2L(Str1) & vbCrLf & vbCrLf
  1951.    txt_Result = strDisplay
  1952.    'time the function
  1953.    Str1 = Text1.Text
  1954.    TimerHandle = cTimerOpen()
  1955.    TimerStartOk = cTimerStart(TimerHandle)
  1956.    For i = 1 To Iteration
  1957.       intResult = cH2I(Str1)
  1958.    Next i
  1959.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1960.    TimerCloseOk = cTimerClose(TimerHandle)
  1961. End Sub
  1962. Private Sub TestSortStr()
  1963.    Dim intResult        As Integer
  1964.    Dim strResult        As String
  1965.    Dim strDisplay       As String
  1966.    Dim i                As Integer
  1967.    Dim Str1             As String
  1968.    intResult = 0
  1969.    strResult = ""
  1970.    strDisplay = ""
  1971.      
  1972.    Str1 = Text1.Text
  1973.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  1974.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1975.    intResult = cSortStr(Str1, 20, 3)
  1976.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1977.    Str1 = "ABCBCABECAEB"
  1978.    strDisplay = strDisplay & "SortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1979.    intResult = cSortStr(Str1, 4, 3)
  1980.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf & vbCrLf
  1981.    Str1 = Text1.Text
  1982.    Str1 = cResizeStringAndFill(Str1, 60, " ")
  1983.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1984.    intResult = cReverseSortStr(Str1, 20, 3)
  1985.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1986.    Str1 = "ABCBCABECAEB"
  1987.    strDisplay = strDisplay & "ReverseSortStr of '" & Str1 & "' is" & vbCrLf & vbCrLf
  1988.    intResult = cReverseSortStr(Str1, 4, 3)
  1989.    strDisplay = strDisplay & "'" & Str1 & "'" & vbCrLf & vbCrLf
  1990.    txt_Result = strDisplay
  1991.    'time the function
  1992.    Str1 = Text1.Text
  1993.    TimerHandle = cTimerOpen()
  1994.    TimerStartOk = cTimerStart(TimerHandle)
  1995.    For i = 1 To Iteration
  1996.       strResult = cSortStr(Str1, 4, 3)
  1997.    Next i
  1998.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  1999.    TimerCloseOk = cTimerClose(TimerHandle)
  2000. End Sub
  2001. Private Sub TestMorse()
  2002.    Dim intResult        As Integer
  2003.    Dim strResult        As String
  2004.    Dim strDisplay       As String
  2005.    Dim i                As Integer
  2006.    Dim Str1             As String
  2007.    intResult = 0
  2008.    strResult = ""
  2009.    strDisplay = ""
  2010.      
  2011.    Str1 = Text1.Text
  2012.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2013.    Str1 = "SOS"
  2014.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2015.    Str1 = "T2WIN-32"
  2016.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2017.    Str1 = "Nothing can beat the fox"
  2018.    strDisplay = strDisplay + "Morse code of '" & Str1 & "' is " & cMorse(Str1) & vbCrLf & vbCrLf
  2019.    txt_Result = strDisplay
  2020.    'time the function
  2021.    Str1 = Text1.Text
  2022.    TimerHandle = cTimerOpen()
  2023.    TimerStartOk = cTimerStart(TimerHandle)
  2024.    For i = 1 To Iteration
  2025.       strResult = cMorse(Str1)
  2026.    Next i
  2027.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2028.    TimerCloseOk = cTimerClose(TimerHandle)
  2029. End Sub
  2030. Private Sub TestToZ9()
  2031.    Dim intResult        As Integer
  2032.    Dim strResult        As String
  2033.    Dim strDisplay       As String
  2034.    Dim i                As Integer
  2035.    Dim Str1             As String
  2036.    Dim Str2             As String
  2037.    intResult = 0
  2038.    strResult = ""
  2039.    strDisplay = ""
  2040.    Str1 = Text1.Text
  2041.    Str2 = cToZ9(Str1)
  2042.    strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2043.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2044.    strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2045.    strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & vbCrLf & vbCrLf
  2046.    Str1 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
  2047.    Str2 = cToZ9(Str1)
  2048.    strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2049.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2050.    strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2051.    strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'" & vbCrLf & vbCrLf
  2052.    Str1 = "01234567890"
  2053.    Str2 = cToZ9(Str1)
  2054.    strDisplay = strDisplay & "To Z9 of '" & Str1 & "' is" & vbCrLf & vbCrLf
  2055.    strDisplay = strDisplay & "'" & Str2 & "'" & vbCrLf & vbCrLf
  2056.    strDisplay = strDisplay & "From Z9 of '" & Str2 & "' is" & vbCrLf & vbCrLf
  2057.    strDisplay = strDisplay & "'" & cFromZ9(Str2) & "'"
  2058.    txt_Result = strDisplay
  2059.    'time the function
  2060.    Str1 = Text1.Text
  2061.    TimerHandle = cTimerOpen()
  2062.    TimerStartOk = cTimerStart(TimerHandle)
  2063.    For i = 1 To Iteration
  2064.       strResult = cToZ9(Str1)
  2065.    Next i
  2066.    mdiT2W.pnl_Timer = cTimerRead(TimerHandle)
  2067.    TimerCloseOk = cTimerClose(TimerHandle)
  2068. End Sub
  2069.